home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
utility
/
tsbat50.zip
/
HEX.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-12-04
|
949b
|
41 lines
@echo off
echo.
echo ┌───────────────────────────────────────────────────┐
echo │ Add & subtract two hexadecimal values │
echo │ By Prof. Timo Salmi, ts@uwasa.fi, Fri 4-Doc-1992 │
echo └───────────────────────────────────────────────────┘
echo.
rem Is help needed
if "%2"=="" goto _help
rem Check that DEBUG.COM is available
set _found=no
if exist debug.com set _found=yes
for %%d in (%path%) do if exist %%d\debug.com set _found=yes
for %%d in (%path%) do if exist %%ddebug.com set _found=yes
if "%_found%"=="no" goto _nodebug
rem Perform the calculation
echo Sum Diff
echo h %1 %2> debug.in
echo q>> debug.in
debug < debug.in
del debug.in
goto _out
rem Error messages
:_nodebug
echo File DEBUG.COM not found at path or the current directory
goto _out
:_help
echo Usage: HEX value1 value2
echo.
echo Gives the sum and the difference of two hexadecimal values
echo.
:_out
set _found=